/**HEADER********************************************************************
* 
* Copyright (c) 2011 Freescale Semiconductor;
* All Rights Reserved                       
*
*************************************************************************** 
*
* THIS SOFTWARE IS PROVIDED BY FREESCALE "AS IS" AND ANY EXPRESSED OR 
* IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES 
* OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  
* IN NO EVENT SHALL FREESCALE OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 
* INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES 
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 
* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, 
* STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING 
* IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF 
* THE POSSIBILITY OF SUCH DAMAGE.
*
**************************************************************************
*
* $FileName: psp_cpudef.h$
* $Version : 3.8.7.0$
* $Date    : Sep-26-2012$
*
* Comments:
*
*
*END************************************************************************/

#ifndef __psp_cpudef_h__
#define __psp_cpudef_h__

#include "mqx_cpudef.h"



/* Power Architecture CPU groups */
#define PSP_CPU_GROUP_MPC512x       (1)
#define PSP_CPU_GROUP_MPC5200       (2)
#define PSP_CPU_GROUP_MPC830x       (3)
#define PSP_CPU_GROUP_MPC831x       (4)
#define PSP_CPU_GROUP_MPC834x       (5)
#define PSP_CPU_GROUP_MPC837x       (6)
#define PSP_CPU_GROUP_POWERQUICC1   (7)
#define PSP_CPU_GROUP_AMCC400       (8)
#define PSP_CPU_GROUP_MPC832x       (9)
#define PSP_CPU_GROUP_MPC5xxx       (10)
#define PSP_CPU_GROUP_MPX           (11)

#define PSP_CPU_GROUP_GENERAL       (15)


/* Power Architecture CPUs */
#define PSP_CPU_AMCC401             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_AMCC400, 1))
#define PSP_CPU_AMCC403             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_AMCC400, 2))
#define PSP_CPU_AMCC405             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_AMCC400, 3))
#define PSP_CPU_AMCC440             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_AMCC400, 4))
#define PSP_CPU_AMCC480             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_AMCC400, 5))


#define PSP_CPU_MPC801              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_POWERQUICC1, 1))
#define PSP_CPU_MPC821              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_POWERQUICC1, 2))
#define PSP_CPU_MPC823              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_POWERQUICC1, 3))
#define PSP_CPU_MPC850              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_POWERQUICC1, 4))
#define PSP_CPU_MPC855              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_POWERQUICC1, 5))
#define PSP_CPU_MPC860              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_POWERQUICC1, 6))
#define PSP_CPU_MPC875              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_POWERQUICC1, 7))


#define PSP_CPU_MPC5121             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC512x, 1))
#define PSP_CPU_MPC5125             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC512x, 2))

#define PSP_CPU_MPC5200             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5200, 1))
#define PSP_CPU_MPC5200B            (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5200, 2))

#define PSP_CPU_MPC8306             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC830x, 1))
#define PSP_CPU_MPC8308             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC830x, 2))
#define PSP_CPU_MPC8309             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC830x, 3))

#define PSP_CPU_MPC8321             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC832x, 1))
#define PSP_CPU_MPC8323             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC832x, 2))

#define PSP_CPU_MPC8313             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC831x, 1))
#define PSP_CPU_MPC8315             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC831x, 2))

#define PSP_CPU_MPC8343             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC834x, 1))
#define PSP_CPU_MPC8347             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC834x, 2))
#define PSP_CPU_MPC8349             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC834x, 3))

#define PSP_CPU_MPC8377             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC837x, 1))
#define PSP_CPU_MPC8379             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC837x, 2))

#define PSP_CPU_MPC603              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_GENERAL, 1))
#define PSP_CPU_MPC604              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_GENERAL, 2))
#define PSP_CPU_MPC740              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_GENERAL, 3))
#define PSP_CPU_MPC750              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_GENERAL, 4))
#define PSP_CPU_MPC8240             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_GENERAL, 5))
#define PSP_CPU_MPC7400             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_GENERAL, 6))

#define PSP_CPU_MPC505              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 1))
#define PSP_CPU_MPC555              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 2))
#define PSP_CPU_MPC566              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 3))
#define PSP_CPU_MPC5553             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 4))
#define PSP_CPU_MPC5554             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 5))
#define PSP_CPU_MPC5566             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 6))
#define PSP_CPU_MPC5567             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 7))
#define PSP_CPU_MPC5674             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 8))

#define PSP_CPU_MPC5668G            (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 9))
#define PSP_CPU_MPC5575             (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 10))
#define PSP_CPU_MPC5606S            (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 11))
#define PSP_CPU_MPC5675K            (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 12))
#define PSP_CPU_MPC5645S            (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 13))
#define PSP_CPU_MPC5643L            (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPC5xxx, 14))

#define PSP_CPU_MPXN20              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPX, 1))
#define PSP_CPU_MPXR40              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPX, 2))
#define PSP_CPU_MPXD10              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPX, 3))
#define PSP_CPU_MPXD20              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPX, 4))
#define PSP_CPU_MPXS20              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPX, 5))
#define PSP_CPU_MPXS30              (PSP_CPU_NUM(PSP_CPU_ARCH_PPC, PSP_CPU_GROUP_MPX, 6))


#define PSP_MQX_CPU_IS_COLDFIRE     ((PSP_GET_CPU_ARCH(MQX_CPU) == PSP_CPU_ARCH_COLDFIRE))
#define PSP_MQX_CPU_IS_PPC          ((PSP_GET_CPU_ARCH(MQX_CPU) == PSP_CPU_ARCH_PPC))

#define PSP_MQX_CPU_IS_POWERQUICC1  (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_POWERQUICC1)))

#define PSP_MQX_CPU_IS_MPC512x      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC512x)))
#define PSP_MQX_CPU_IS_MPC5xxx      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC5xxx)))
#define PSP_MQX_CPU_IS_MPC5200      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC5200)))
#define PSP_MQX_CPU_IS_MPX          (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPX)))

#define PSP_MQX_CPU_IS_MPC830x      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC830x)))
#define PSP_MQX_CPU_IS_MPC831x      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC831x)))
#define PSP_MQX_CPU_IS_MPC832x      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC832x)))
#define PSP_MQX_CPU_IS_MPC834x      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC834x)))
#define PSP_MQX_CPU_IS_MPC837x      (PSP_MQX_CPU_IS_PPC && ((PSP_GET_CPU_GROUP(MQX_CPU) == PSP_CPU_GROUP_MPC837x)))
#define PSP_MQX_CPU_IS_MPC83xx      (PSP_CPU_GROUP_MPC830x || PSP_CPU_GROUP_MPC831x || PSP_CPU_GROUP_MPC832x || PSP_CPU_GROUP_MPC834x || PSP_CPU_GROUP_MPC837x)


#endif
